<template>
  <el-dialog title="选择物业" :visible.sync="dialogVisible" width="80%" :before-close="handleClose" :close-on-click-modal="false">
    <div class="margin-box" v-loading="loading" element-loading-text="数据加载中...">
      <list-page
        :pager="pager"
        :showSelectSearch="false"
        :placeholder="placeholder"
        :showSelectTips="true"
        :selectList="selectDataArr"
        @searchByKey="searchByKey"
        @changePageSize="changePageSize"
        @changeCurrentPage="changeCurrentPage"
        @selectionChange="selectionChange"
      >
        <template slot="table">
          <el-table
            ref="multipleTable"
            align="left"
            :data="tableData"
            style="width: 100%"
            highlight-current-row
            @row-click="rowClick"
            @selection-change="selectionChange"
          >
            <!-- <el-table-column
                            type="selection"
                            width="55"
            />-->
            <el-table-column label="物业名称" prop="propertyName" />
            <el-table-column label="物业类型" prop="propertyType" :formatter="dictFormate" />
            <el-table-column label="物业用途" prop="useType" :formatter="dictFormate" />
            <el-table-column label="建筑面积(m²)" prop="buildArea" />
            <el-table-column label="产权情况" prop="propertyOwnership" :formatter="dictFormate" />
            <el-table-column label="物业状态" prop="propertyStatus" :formatter="dictFormate" />
            <el-table-column label="物业来源" prop="propertySource" :formatter="dictFormate" />
          </el-table>
        </template>
      </list-page>
    </div>

    <span slot="footer" class="dialog-footer">
      <el-button @click="dialogVisible = false">取 消</el-button>

      <el-button type="primary" @click="submit">确 定</el-button>
    </span>
  </el-dialog>
</template>

<script src="./property_list.js"></script>

<style scoped lang="scss">
/deep/.el-dialog__body {
  padding: 0px;
}
</style>
